from time import sleep

from commo.random import create_pone, create_id
from page.login import com


# 新增入职模板


def add_ruzhi():
    # com: Commonshare = Commonshare()
    # 生成随机身份证号层
    sleep(4)
    com.click("xpath", com.yaml("quick", "花名册"))
    sleep(3)
    com.click("xpath", com.yaml("quick", "添加员工"))
    sleep(2)
    com.input_data("xpath", com.yaml("add_ruzhi", "姓名"), "张院龙")
    sleep(1)
    com.input_data("xpath", com.yaml("add_ruzhi", "手机号码"), create_pone())
    sleep(1)
    com.input_data("xpath", com.yaml("add_ruzhi", "身份证号"), create_id())
    sleep(1)
    com.click("xpath", com.yaml("add_ruzhi", "工作性质"))
    sleep(2)
    com.select('.ant-select-dropdown-menu-item', 1)
    sleep(1)
    com.click("xpath", com.yaml("add_ruzhi", "入职日期"))
    sleep(1)
    com.click("xpath", com.yaml("add_ruzhi", "入职今天"))
    sleep(1)
    com.select('.ant-space-item', 1)
    print("完毕了")
